package com.tsingteng.cosfun.ui.message.comment.videocomment;

import android.text.TextUtils;

import com.tsingteng.cosfun.bean.AddVideoCommentResultBean;
import com.tsingteng.cosfun.bean.BaseDataBean;
import com.tsingteng.cosfun.bean.CommBean;
import com.tsingteng.cosfun.bean.MessageVideoCommentBean;
import com.tsingteng.cosfun.bean.VideoPriseResultBean;
import com.tsingteng.cosfun.common.Config;
import com.tsingteng.cosfun.mvp.module.BaseModel;
import com.tsingteng.cosfun.utils.AppUtils;
import com.tsingteng.cosfun.utils.LogonUtils;

import retrofit2.Callback;

/**
 * @我。赞我。评论我页面点击展示视频评论页M层
 * 常胜
 * 2018.8.23
 * */
public class VideoCommentModel extends BaseModel implements IVideoCommentModel {


    @Override
    public void getVideoCommentListResponse(int page, int id,String commentId, Callback<MessageVideoCommentBean> rxObserver) {
        doRxRequest().getVideoComment(String.valueOf(LogonUtils.getProFildId()),String.valueOf(id),commentId,String.valueOf(page), Config.PAGE_SIZE+"").enqueue(rxObserver);
    }

    @Override
    public void getMyVideoCommentResponse(String workid, String parentCommentId, String userId, String commentMsg, int isTop, Callback<AddVideoCommentResultBean> callback) {

            doRxRequest().getVideoResultComment(workid,parentCommentId,userId,commentMsg,isTop).enqueue(callback);

//            doRxRequest().getVideoResultComment(workid,parentCommentId,userId,commentMsg,1).enqueue(callback);
    }

    @Override
    public void getPriseResponse(String workId, int type, Callback<BaseDataBean<CommBean>> callback) {
        doRxRequest().getPriseState(workId,"", "",type).enqueue(callback);
    }

    @Override
    public void commDel(String commID, Callback<BaseDataBean<String>> callback) {
        doRxRequest().getCommDel(commID).enqueue(callback);
    }
}
